﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using JumpFleetGameLib.Objects.Weapons;

namespace JumpFleetGameLib.Objects.Ships
{
    public abstract class BaseShip : IShip
    {
        private Rectangle m_Bounds;

        public Vector2 Position { get; set; }
        public Vector2 Velocity { get; set; }
        public Vector2 Direction { get; set; }
        public Vector2 Origin { get; set; }
        public Rectangle Bounds { get { return m_Bounds; } set { m_Bounds = value; } }
        public Texture2D ShipTexture { get; set; }
        public string Name { get; set; }
        public int Health { get; set; }
        public int Shield { get; set; }
        public float Speed { get; set; }
        public float Rotation { get; set; }
        public float Size { get; set; }
        public BaseWeapons Weapon { get; set; }




        public BaseShip()
        {
        }

        public BaseShip(string name) : base()
        {
            Name = name;
            m_Bounds = new Rectangle();
            
        }


        public void FireWeapon()
        {
        }
        public bool FTL()
        {
            return false;
        }
        public void Reload()
        {
        }

        public void RechargeShields()
        {
        }





        public void LoadContent()
        {
        }
        public virtual void Update(GameTime gametime)
        {

            // Recalculate the bound
            m_Bounds.X = (int)Position.X;
            m_Bounds.Y = (int)Position.Y;

        }
        public virtual void Draw(SpriteBatch batch)
        {
        }
        public virtual bool CheckCollision(IShip bounds)
        {

            //if(this.Position.X +


            return false;
        }





    }
}
